import request from '@/utils/request'
// 获取部门数据
export function getDepartments() {
  return request({
    method: 'get',
    url: '/company/department'
  })
}

// 添加部门
export function addDepartmentAPI(data) {
  return request({
    method: 'post',
    url: '/company/department',
    data
  })
}
// 根据id查询部门
export function reqDepartmentAPI(id) {
  return request({
    method: 'get',
    url: '/company/department/' + id
  })
}
// 根据id修改部门
export function editDepartmentAPI(data) {
  return request({
    method: 'put',
    url: '/company/department/' + data.id,
    data
  })
}

// 根据id删除部门
export function delDepartmentAPI(id) {
  return request({
    method: 'delete',
    url: '/company/department/' + id
  })
}
